<html>
<head>
<title>Language Support</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td width="100%">
			<table width="100%" height="78" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="topnav">
			<tr>
				<!-- Header Side -->
				<td width="17">
					<img height="78" src="media/reportico100.png"/>
				</td>
				<td align="right"></td>
				<td align="center">
					<table width="100%" height="60" border="0" align="left" cellpadding="0" cellspacing="0">
						<tr>
							<td valign="top" align="left">
							<img src="media/repbanner.png"/></td>
							</td>
						</tr>
						<tr>
							<td align="center" valign="bottom" class="topmenucell">
								<nobr>
								&nbsp;
								</nobr>
							</td>
						</tr>
					</table>
				</td>
				<td width="103" class="toplogincell">
					&nbsp;
				</td>
			</tr>
			</table>
</td>
  </tr>
  <!--tr>
    <td class="header_top">reportico</td>
  </tr-->
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_reportico.html" class="menu">class tree: reportico</a> ]
		  [ <a href="../elementindex_reportico.html" class="menu">index: reportico</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_reportico.html">reportico</a><br />
            <br /><br />
		<b>Tutorials/Manuals:</b><br />
					<strong>Package-level:</strong>
							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.pkg.html">Reportico Tutorial And User Manual</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.manual.pkg.html">Reportico User Manual</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.quickstart.pkg.html">Reportico Installation</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.gettingstarted.pkg.html">Getting Started</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.structure.pkg.html">Reportico Installation Structure</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.using.pkg.html">Configuring Reportico - System Parameters</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.embedding.pkg.html">Embedding Reportico</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.security.pkg.html">Reportico Security</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.language.pkg.html">Language Support</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.projects.pkg.html">Projects</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.importlink.pkg.html">Importing and linking from reports</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.menus.pkg.html">Report Menus</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.prepare.pkg.html">Report Preparation and Execution</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.design.pkg.html">Report Design Mode</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.format.pkg.html">The Design Format Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.customcode.pkg.html">Custom Source Code</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.qrydet.pkg.html">The Query Details Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.assign.pkg.html">The Assignments Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.criteria.pkg.html">The Criteria Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.output.pkg.html">The Output Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.webservices.pkg.html">Turning Reports into Web Services (currently unavailable)</a>
</ul>
</li></ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.faq.pkg.html">Reportico FAQ</a>
</ul>
</li></ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.howto.pkg.html">Reportico Tutorial</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1.pkg.html">Tutorial No.1 - The Film Listing Report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_1.pkg.html">Tutorial 1 Stage 1 - Creating a basic report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_2.pkg.html">Tutorial 1 Stage 2 - Creating User Entry Criteria</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_3.pkg.html">Tutorial 1 Stage 3 - Working with expressions using assignments</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_4.pkg.html">Tutorial 1 Stage 4 - Working with groups</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_5.pkg.html">Tutorial 1 Stage 5 - Including database graphics into the report and generating drilldowns</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial2_1.pkg.html">Tutorial 2 - Creating the loan history report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial3_1.pkg.html">Tutorial 3 - The Monthly Returns Report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial4_1.pkg.html">Tutorial 4 - The Late Returns Summary report</a>
</ul>
</li></ul>
</li></ul>

							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.appendix1.pkg.html">Appendix 1 - Reportico Project Configuration parameters</a>
</ul>

							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.appendix2.pkg.html">Appendix 2 - Reportico URL request parameters</a>
</ul>

									                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../reportico/_reportico.php.html">		reportico.php
		</a><br>
	  </div><br />
      
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"../reportico/tutorial_reportico.security.pkg.html">Prev</a></td>
<td width="80%" align="center" valign="bottom"></td>
<td width="10%" align="right" valign="bottom"><a href=
"../reportico/tutorial_reportico.projects.pkg.html">Next</a></td>
</tr>
</table>
<span><a name="language"></a><h2 class="title">Language Support</h2><a name="language.lanintroduction"></a><h3 class="title">Introduction</h3><p>With the introduction of version 2.4, Reportico provides multiple language support as follows :-
    <ul><li>Configuration options for handling different character encodings used within your database or in presentation to the browser.
         Character sets such as UTF-8, Latin, ISO-8859-x, Windows-xxxx,  Chinese GBK, and Japanese SJIS are supported. Level of support is dependent on your 
         combination of operating system and database.<br /></li>
      <li>The ability to translate the core Reportico application into different languages by creating/maintaining language files<br /></li>
      <li>The ability to provide translations for your database data strings by maintaining project language translation files<br /></li></ul></p>
   <p>Note that PDF output in different languages is dependent on specific font requirements. See the section:q
For further details see the <a href="../reportico/tutorial_reportico.language.pkg.html#language.PDF">PDF Font and Language Support</a> section.</p><hr />
  <a name="language.dbencoding"></a><h3 class="title">Character Sets and Encoding within the Database</h3><p>Depending on your type of database it may be necessary to specify a character set for fetching database data. This is true in many MySQL installations where the default character set for a database connection is LATIN1 but many databases store data in Unicode UTF8 format and others. If the data in the database is in, say UTF8 format, then Reportico must be told about this to alter its connection accordingly. Other databases may already provide data in the the desired encoding and there it is not necessary to specify an encoding. You can set the character set when you create or configure a project. By default, Reportico assumes no encoding and will therefore not run any special command on each connection to the database to set an expected encoding standard. If you are unsure of what to set this value to, then if you are in an English speaking country then leaving the default of <strong>None</strong> is probably ok, otherwise UTF8 is probably a good alternative to start with.</p>
   <p>In the <strong>Create Project</strong> and <strong>Configure Project</strong> screens you can select your database encoding using the <strong>Database Character Encoding</strong> field.</p>
   <p>The encoding can also be set manually for an existing project by editing the configuration file <strong>config.php</strong> which is found in the appropriate project folder under the <strong>projects</strong> folder. Just change the SW_DB_ENCODING value to be a value that you would pass to the standard SQL &quot;SET NAMES&quot; command which sets your encoding. Depending on the database, valid values include None, UTF8, EUC_CN, EUC_JP, EUC_KR, EUC_TW, GB18030, GBK, ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8, LATIN1, LATIN2, LATIN3, LATIN4, LATIN5, LATIN6, LATIN7, LATIN8, LATIN9, LATIN10, SJIS, WIN1250, WIN1251, WIN1252, WIN1253, WIN1254, WIN1255, WIN1256, WIN1257, WIN1258. With Microsoft SQL Server, UTF8 and PHP are not known for working easily, but should work in most scenarios, however may not work with other encodings.</p><hr />
  <a name="language.outputencoding"></a><h3 class="title">Character Sets and Encoding in Output</h3><p>Browsers also need to know what character set your reports are generating report output in. This in most cases will be the same as the format you are reading data in. So if you are reading from the database in UTF8 then you probably want to tell the browser that your output is UTF8. Using the default of noencoding will place no instructions in the browser header, which in many browsers means ISI-8859-1 european encoding. As with the database encoding, if you are unsure it is good to start with &quot;No encoding&quot; which will work for English speaking countries or the next to try would be UTF8 which is the most commonly used encoding in websites pages.</p>
   <p>In the <strong>Create Project</strong> and <strong>Configure Project</strong> screens you can select your output encoding using the <strong>Database Character Encoding</strong> field.</p>
   <p>The encoding can also be set manually for an existing project by editing the configuration file <strong>config.php</strong> which is found in the appropriate project folder under the <strong>projects</strong> folder. Just change the SW_OUTPUT_ENCODING value to be one of 
None, UTF8, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8-I, ISO-8859-8, ISO-8859-9, ISO-8859-10, ISO-8859-11, ISO-8859-12, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, GB2312, GBK, Shift_JIS, Windows-1250, Windows-1251, Windows-1252 Windows-1253, Windows-1254, Windows-1255, Windows-1256, Windows-1257, Windows-1258, Big5, GB18030, HZ, EUC-JP, EUC-KR, TIS-620.</p><hr />
  <a name="language.apptranslations"></a><h3 class="title">Reportico Application Translations</h3><p>The core Reportico designer application can be translated into different languages. All the text that makes up the Reportico Application is set up in language specific files held under the <strong>language</strong> folder. For each language there is an associated folder, for example en_gb for UK English.  In each of these language specific folders, 6 translation files can be found :- languages.php (Contains translations of the languages supported), admin.php (Contains strings used in the administration page), menu.php ( contains strings displayed in project menus), prepare.php ( contains strings used in criteria entry mode ), maintain.php ( contains strings displayed in report design mode ) and execute.php ( contains strings displayed in report output ). By default Reportico comes with UK English and US English. You may create your own or download others from the Reportico site at <a href="http://www.reportico.org/swsite/site/downloads/">http://www.reportico.org/swsite/site/downloads/</a>. At the time of writing Reporting only comes with 3 other EXPERIMENTAL languages which can be found below the <strong>languages/packs</strong> folders.. these are French, Spanish and Chinese which are all highly experimental and produced by online translation engines. To use any of these languages move them up a level into the <strong>languages</strong> directory. If your language is not supported or your character encoding (see next paragraph) is not supported or the language is not linguistically correct then please feel free to submit a language pack to the Reportico site either by posting to the forum or by sending via email.</p>
<p>Since Reportico can generate web output in different character sets, the language packs under eahc language directory must all be in UTF-8. These will be converted to the output character set (if necessary) at run time. Having the output character encoding in UTF-8 has less of a performance hit. However, saying that, language packs in other character sets can be provided if placed in an folder under the language folder with an appropriate name. So for example, French could have translations in ISO-8859-1. Chinese could have translations provided in GB2312, GBK or BIG5 encodings as well as UTF-8. To cater for multiple encodings, each language folder may contain a folder for each encoding type each with their own set of translations. If no folder matching the used encoding is used then the default set of translations under the language folder itself is used which is the default of UTF8. So for example, the Chinese language folder cn_zh may contain a set of language files in Unicode UTF8 format by default, but other encodings such as GB2312 would have translations below cn_zh/GB2312 and BIG5 would appear under cn_zh/BIG5. So to recap, Reportico language packs all contain a set of translations by default in UTF-8 format in their top level directory. Any other encoded translations appear in their own folder named as one of  ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8-I, ISO-8859-8, ISO-8859-9, ISO-8859-10, ISO-8859-11, ISO-8859-12, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, GB2312, GBK, Shift_JIS, Windows-1250, Windows-1251, Windows-1252 Windows-1253, Windows-1254, Windows-1255, Windows-1256, Windows-1257, Windows-1258, Big5, GB18030, HZ, EUC-JP, EUC-KR, TIS-620</p>
   <p>New language folders may be created under the <strong>language</strong> folder. Just create your language folder there named with the appropriate language code (you could copy the contents of the en_gb folder to get you started. Then edit each of the language files in your new folder and translate all the text on the right of the &quot;=&gt;&quot; to your desired language. If you are creating your translations in Unicode UTF* format then the translations should appear below the language directory you created, otherwise they need to appear in their own encoding directory as detaild in the previous paragraph.</p>
   <p>To change existing language text, simply navigate to the relevant language directory and edit the existing files.</p>
   <p>The default language for your Reportico installation is prompted for when you run Reportico for the first time at the same time as you set the administrator password. This is stored in the <strong>SW_LANGUAGE</strong> configuration parameter found within the file <strong>projects/admin/config.php</strong>. This can be modified manually to any language relating to any language pack installed below the <strong>language</strong> folder. The language for the current session can be changed in the Administration page, but the default Administrator language must be set in the <strong>config.php</strong> after it has been set in initialisation.</p>
   <p>Additionally a default language must be set for each report project. This is the language that will be used if a report user follows a link directly to the project report suite without going through the administration page - otherwise the administration page language will be used. The project language is set in the <strong>Create Project</strong> and <strong>Configure Project</strong> pages. The project language is stored in the <strong>SW_LANGUAGE</strong> configuration parameter found within the <strong>config.php</strong> of your report project folder. This can be changed at any point using the <strong>Configure Project</strong> page or by manually changing this parameter in the <strong>config.php</strong> file to a language as found under the main reportico <strong>language</strong> folder.</p>
   <p>An option to change the current operating language is provided both in the Administration pane and in the Menu Page. If you want to limit the number of languages available or only work in one language then simply remove all the languages below the  Reportico <strong>language</strong> folder that you are not interested in. If you remove all but one language then the language will not be prompted for since only one is available. There must be at least one language for Reportico to work!</p>
   <p>Since Reportico reports may be executed directly or linked to via http url requests, it is possible to set the session operating language by specifying the URL language parameter  <strong>language</strong>. Passing  <strong>language=fr_fr</strong> will run a report or link to Reportico in French assuming the language exists.</p><hr />
  <a name="language.usertranslations"></a><h3 class="title">User Data Translations</h3><p>As well internationalisation support for the Reportico application, there is also translation support for Reportico user data, so that criteria entry labels, report descriptions, report output column header/trailer names, titles etc can be specified in several languages. That is a single Reportico project can be used by users from different countries. You only need to edit the file <strong>lang.php</strong> in your project and place all the translations you want in there. An example from the supplied tutorials is as follows :-
    <code><pre>
&lt;?php
$g_translations = array (
        &quot;en_gb&quot; =&gt; array (
            ),
        &quot;fr_fr&quot; =&gt; array (
           &quot;Criteria&quot; =&gt; &quot;Critere&quot;,
           &quot;Film&quot; =&gt; &quot;Filme&quot;,
           &quot;Country&quot; =&gt; &quot;Pays&quot;,
           &quot;Film Category&quot; =&gt; &quot;Categorie Du Film&quot;,
            .....
</pre></code></p>
   <p>In the example above any criteria item, column header, trailer label named &quot;Country&quot; will appear in its French equivalent &quot;Pays&quot;.
Note that currently report data showing in the body of the report are not translated, but support for this will appear in the near future.</p><hr />
  <a name="language.datepickers"></a><h3 class="title">Country Specific Date Pickers</h3><p>The date picker available in Reportico (thanks to jQuery) can also take advantage of the system language. It will display the month and week elements relevant to the country. As long as your language is specified as one of the ones in the next section &quot;Language Codes&quot; it should work.</p>
   <p>Note that currently report data showing in the body of the report are not translated, but support for this will appear in the near future.</p><hr />
  <a name="language.languagecodes"></a><h3 class="title">Known language codes</h3><p>The language codes used must correspond to those used in Linux systems as follows :-
    <code><pre>
af     en_nz  hu     no     ta
ar_dz  eo     hy     pl     th
ar     es     id     pt_br  tj
az     et     is     pt     tr
bg     eu     it     rm     uk
bs     fa     ja     ro     vi
ca     fi     ko     ru     zh_cn
cs     fo     kz     sk     zh_hk
da     fr_ch  lt     sl     zh_tw
de     fr     lv     sq     
el     gl     ml     sr
en_au  he     ms     sr_sr
en_gb  hr     nl     sv
en_us  hr     nl     sv
</pre></code></p>
   <p></p><hr />
  <a name="language.PDF"></a><h3 class="title">PDF Font and Language Support</h3><p>Reportico makes use of both PDF geneartion libraries <strong>FPDF</strong> (www.fpdf.org) and  <strong>UFPDF</strong> (http://acko.net/blog/ufpdf-unicode-utf-8-extension-for-fpdf/). Depending on the chosen PDF reporting font, one or the other will be used. FPDF is used to produce reports in an ASCII character set (an operates more quickly ) and UFPDF is a Unicode variant that is able to produce non-ASCII characters assuming a suitable font is provided. Users wishing to output their data in a non-English only character sets, which include characters not found in standard ASCII, should choose a Font which caters for their language. Users wanting non-standard fonts can import their own. Note that if the font supports many characters it can have quite an impact on the report generation time.</p>
<p>Note that if a UTF-8 font is used then the project output character set must be set to UTF-8 too. Reportico cannot calculate whether a PDF is UTF-8 or not.</p>
<p>Reportico comes with a small set of supported fonts.
For ASCII reporting (e.g. Latin character sets), Reportico comes with helvetica, times, courier and times fonts. Reportico comes with several Truetype Unicode fonts :- LiberationSans-Regular (good for most European character sets), Mothanna/Thabit for arabic support, WenQuanYiZenHei for Chinese support, japanese-gothic for Japanese support. Others will be added over time.</p>
    <a name="PDFCustomFonts"></a><h4 class="title">Using your own custom fonts</h4><p>To load your own custom font from a Truetype font, go to the <strong>fpdf/font</strong> area and see the README.txt file in there for instructions. On a linux machine you should be able to got to the fpdf/font directory, copy a ttf font file in there and run <strong>sh makepdffont fontname-without-ttf-extension</strong>. This should create a fontname.php file. To use the font as a project default  you can edit the config.php file in your project directory and change the parameter <strong>SW_DEFAULT_pdfFont</strong> to the name of your font (without the ttf extension). To set the font in a single report file edit the report in design mode, go to the Format and enter the font name against the <strong>Font (PDF)</strong> field.</p><br /><hr /></span>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="../reportico/tutorial_reportico.security.pkg.html">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"../reportico/tutorial_reportico.manual.pkg.html">Up</a></td>
<td width="33%" align="right" valign="top"><a href=
"../reportico/tutorial_reportico.projects.pkg.html">Next</a></td>
</tr>

<tr>
<td width="33%" align="left" valign="top">Reportico Security</td>
<td width="34%" align="center" valign="top">Reportico User Manual</td>
<td width="33%" align="right" valign="top">Projects</td>
</tr>
</table>
        <div class="credit">
		    <hr />
		    Documentation generated on Mon, 09 Jun 2014 18:10:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>